<template>
    <div class="positionR">
        <div class="fc-header">
            <div class="fc-wuserheader">
                <img v-if="pageMsg.belongStoreInfo && pageMsg.belongStoreInfo.storeId" class="fc-userheader" :src="pageMsg.belongStoreInfo.logo" alt="">
                <span v-if="pageMsg.belongStoreInfo && pageMsg.belongStoreInfo.storeId" class="fc-userheader-des">
                        <span>{{pageMsg.belongStoreInfo.name}}</span>
                            <span class="userheader-des" v-if="parseInt(storeDiscount) > 0">{{pageMsg.belongStoreInfo.industry}}{{storeDiscount}}</span>
                        </span>
                <span class="fc-attention">关注</span>
                <span class="fc-swiper-wpagination" v-if="pageMsg.mediaType == 1">
                                <span class="fc-swiper-pagination">
                                    <span id="activeIndex">1</span>/{{pageMsg.mediaContents.length}}
                                </span>
                            </span>
            </div>
        </div>
        <!--swiper-->
        <full-height-swiper
                v-if="pageMsg.promotionInfo && pageMsg.promotionInfo.mediaType == 1 && Object.keys(FHSwiperMsg).length > 0"
                :FHSwiperMsg="FHSwiperMsg"
                @change-end-cb="nowIndex"
                @touch-end-cb="nowIndex">
        </full-height-swiper>
        <!--推广海报poster-->
        <!--<div class="promotion-poster-wrap" v-if="pageMsg.mediaType == 1 && Object.keys(FHSwiperMsg).length > 0" >-->
        <!--<img class="promotion-poster" :src="FHSwiperMsg.imagesList" alt="">-->
        <!--</div>-->
        <full-height-video
                v-else-if="pageMsg.promotionInfo && pageMsg.promotionInfo.mediaType == 0 && Object.keys(videoMsg).length > 0"
                :videoPropsMsg="videoMsg"
        >
        </full-height-video>
        <!--底部立即下载的按钮-->
        <!--<bottom-down v-if="bottomDownShow"></bottom-down>-->
        <!--左侧悬浮-->
        <transition name="suspension" :duration="{leave:1000}" leave-active-class="animated zoomOut">
            <fc-suspension
                    ref="fcSuspension"
                    v-if="Object.keys(suspensionProps).length > 0"
                    :suspensionProps="suspensionProps"
                    @animationCb="suspensionCb"
            ></fc-suspension>
        </transition>
        <!--优惠券-->
        <coupons-v1
                v-if="showCoupons && couponsProps.length > 0"
                :couponsProps="couponsProps"
                @refresh="getPageMsg"
                @showSuspensionFn="showSuspensionFn"
                @suspensionCb="suspensionCb"
        ></coupons-v1>
        <!--手机登录-->
        <!--微信分享-->
        <wx-share-body v-if="pageMsg && pageMsg.shareBodyInfo && Object.keys(pageMsg.shareBodyInfo).length > 0 " :shareBody="pageMsg.shareBodyInfo"></wx-share-body>
    </div>
</template>

<script>
    export default {
        name: "activity",
        propsPage:{
            type:Object
        },
        data(){
            return{
                suspension:true,
                suspensionProps:{},
                showCoupons:false,
                showSuspension:true,
                swiperItem:{},
                FHSwiperMsg:{},
                videoMsg:{},
                couponsProps:[],
                bottomDownShow:true,
                showIndex:1,
                pageListMsg:[],
                storeDiscount:-1,
                wrapSwiperOption: {
                    direction: 'vertical',
                    speed:500,
                    onSlideChangeEnd: function(){
                        this.$emit('change-end-cb')
                    }.bind(this),
                    onTouchEnd: function(){
                        this.$emit('touch-end-cb')
                    }.bind(this),
                },
            }
        },
        mounted(){
            let that = this;
            if(that.propsPage){
                let keys = Object.keys(that.propsPage);
                if( this.propsPage && keys.includes("bottomDownShow") ){
                    this.bottomDownShow = this.propsPage.bottomDownShow;
                }
            }
            this.init();
        },
    }
</script>

<style scoped>

</style>